<template>
    <div class="in">
        <div class="index2">
            <div class="iin">
                <div class="index2_1">
                    <span class="ti1" v-for="i in peer_route" :key="i" :style="[{borderBottom: name===i?'3px solid #00c3ff':''},{color: name===i?'#00c3ff':''}]" @click="route(i)">{{i}}</span>
                    <!-- <span class="ti2">最新回复</span>
                    <span class="ti3">热门</span> -->
                </div>
                <div class="index2_2">
                    <i class="el-icon-edit"></i>
                    <div>发布帖子</div>
                </div>
            </div>
        </div>
        <div class="index">
            <div class="w1">
                <router-view />
            </div>
            <div class="w2">
                <div class="w2_2">
                    <div class="w2_2_1">
                        <div class="uia1">
                            <img src="https://img-static.mihoyo.com/new_qrcode/qrcode_ys.png" width="100px" alt="">
                            <div class="uia1_1">
                                <span class="ti1">扫码下载米游社App</span>
                                <span class="ti2">了解提瓦特最新资讯</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="w2_3">
                    <div class="w2_3_index">
                        <div class="una1">
                            <span>同人榜</span>
                        </div>
                        <div class="una2">
                            <span>更多</span>
                        </div>
                    </div>
                    <div class="w2_3_index2" v-for="item in 10" :key="item">
                        <div class="ttt1">
                            <img class="img1" src="https://upload-bbs.mihoyo.com/upload/2022/05/05/81879993/280f6f42eff714787240775969a2d23d_4752493220723965503.jpg?x-oss-process=image/resize,s_200/quality,q_80/auto-orient,0/interlace,1/format,jpg" alt="">
                        </div>
                        <div class="ttt2">
                            <span class="ti1">女覅是v你比哥白尼平衡感然后我共和国回复iv公布i1</span>
                            <div class="ttt2_1">
                                <img class="img2" src="https://img-static.mihoyo.com/communityweb/upload/fbab8d08cd32fc760b1d500eeacd7f2e.png" alt="">
                                <span class="ti2">啦啦啦啦啦啦啦</span>
                            </div>
                            <div class="ttt2_2">
                                1
                            </div>
                        </div>
                    </div>
                </div>
                <div class="w2_5">
                    <div class="w2_5_index">
                        <div class="una1">
                            <span>热门话题</span>
                        </div>
                        <div class="una2">
                            <span>更多</span>
                        </div>
                    </div>
                    <div class="w2_5_index2">
                        <div class="tiing" v-for="item,i in tuia" :key="i">
                            <img :src="item.img" alt="">
                            <span>{{item.na}}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <el-backtop :bottom="300" :right='300'> 
            <img src="../assets/img/top.png" alt="">
        </el-backtop>
    </div>
</template>

<script>
export default {
    data() {
        return {
            name: '热门',
            peer_route: ['最新发帖', '最新回复', '热门'],

            imgList: [
                'https://upload-bbs.mihoyo.com/upload/2022/03/30/5f1612a985b3c421e3298bc17618a43b.jpeg',
                'https://upload-bbs.mihoyo.com/upload/2022/04/29/3fe57965ed348966dd93dfaba28da0f6.jpeg',
                'https://upload-bbs.mihoyo.com/upload/2022/04/29/b20891f66c723d6c569c1e8f3447671e.jpeg',
                'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg',
                'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg'
                ],
            www: [
                '你好uacdfssf','不好吧','太好啦'
            ],
            imgList2: [
                'https://upload-bbs.mihoyo.com/pc_ad/pc_ad_ys_game_record2.jpg',
                'https://upload-bbs.mihoyo.com/upload/2022/03/29/d169c8353e5c428340f0bcac4b9e8b34_6854408165333802564.jpg',
                'https://upload-bbs.mihoyo.com/pc_ad/ys_signin.jpg'
            ],
            guangfang: [
                {name: '活动', title: '从你少女i发VS篇v你是否不顾i打不过打不过打不过跑环任务交割日无法'},
                {name: '资讯', title: '从你少女i发VS篇v你是否不顾i打不过打不过打不过跑环任务交割日无法'},
                {name: '资讯', title: '从你少女i发VS篇v你是否不顾i打不过打不过打不过跑环任务交割日无法'},
                {name: '公告', title: '从你少女i发VS篇v你是否不顾i打不过打不过打不过跑环任务交割日无法'},
                {name: '公告', title: '从你少女i发VS篇v你是否不顾i打不过打不过打不过跑环任务交割日无法'},
            ],
            tuia: [
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/7078d15984ddbbb8aaa6280a9cb86407_5699639779014808393.gif?x-oss-process=image/auto-orient,0/interlace,1/format,jpg', na: '假日冒险？触发！'},
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/7078d15984ddbbb8aaa6280a9cb86407_5699639779014808393.gif?x-oss-process=image/auto-orient,0/interlace,1/format,jpg', na: '假日冒险？触发！'},
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/7078d15984ddbbb8aaa6280a9cb86407_5699639779014808393.gif?x-oss-process=image/auto-orient,0/interlace,1/format,jpg', na: '假日冒险？触发！'},
            ],
            usertuiji:[
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/7078d15984ddbbb8aaa6280a9cb86407_5699639779014808393.gif?x-oss-process=image/auto-orient,0/interlace,1/format,jpg', name: '从你少女', dengji: 'Lv.9', title: '水泥厂你是v发'},
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/7078d15984ddbbb8aaa6280a9cb86407_5699639779014808393.gif?x-oss-process=image/auto-orient,0/interlace,1/format,jpg', name: '从你少女i发VS篇v你是否不顾i打不过打不过打不过跑环任务交割日无法', dengji: 'Lv.9', title: '水泥厂你是v发'},
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/7078d15984ddbbb8aaa6280a9cb86407_5699639779014808393.gif?x-oss-process=image/auto-orient,0/interlace,1/format,jpg', name: '从你', dengji: 'Lv.9', title: '水泥厂你是v发'},
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/7078d15984ddbbb8aaa6280a9cb86407_5699639779014808393.gif?x-oss-process=image/auto-orient,0/interlace,1/format,jpg', name: '从你少女i发VS篇v你是否不顾i打不过打不过打不过跑环任务交割日无法', dengji: 'Lv.9', title: '水泥厂你是v发'},
            ],
            meiyutuijan: [
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/22/22630933/e5e9e7ee01c8befb3e9d86149fbdb311_7405146438885921199.jpg', titl: 'dnisdnacfuivbf才能丢v发表VS吧v夫i欧冠我不够稳固货物发到就拿出来覅就覅我'},
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/22/22630933/e5e9e7ee01c8befb3e9d86149fbdb311_7405146438885921199.jpg', titl: 'dnisdnacfuivbf才能丢v发表VS吧v夫i欧冠我不够稳固货物发到就拿出来覅就覅我'},
                {img: 'https://upload-bbs.mihoyo.com/upload/2022/04/22/22630933/e5e9e7ee01c8befb3e9d86149fbdb311_7405146438885921199.jpg', titl: 'dnisdnacfuivbf才能丢v发表VS吧v夫i欧冠我不够稳固货物发到就拿出来覅就覅我'},
            ]
        }
    },
    methods: {
        route(i) {
            this.name = i
            if(i === '最新发帖') {
                this.$router.push('/llatest post')
                // this.pp = [{p: 11, n: 22}]
            }else if(i === '最新回复') {
                this.$router.push('/llatest reply')
                // this.pp = [{p: 99, n: 88}]
            }else if(i === '热门') {
                this.$router.push('/lhot')
            }
        }
    }
}
</script>
<style lang="less" scoped>
    .el-backtop img {
        max-width: 100px;
    }
    .in {
        width: 100%;
        background-color: #f7f5f5;
        .index {
            // border: 1px solid red;
            display: flex;
            margin-top: 80px;
            justify-content: center;
            .w1 {
                // border: 1px solid red;
                width: 700px;
                height: 100%;
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                // margin-top: -23px;
                // position: relative;
            }
            .w2 {
                display: flex;
                justify-content: center;
                flex-wrap: wrap;
                width: 260px;
                // background-color: red;
                overflow: hidden;
                
                .w2_2 {
                    background-color: white;
                    // margin-top: 22px;
                    // border: 1px solid red;
                    width: 95%;
                    height: 130px;
                    border-radius: 5px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    flex-wrap: wrap;
                    cursor: pointer;
                    .w2_2_1 {
                        // border: 1px solid rgb(0, 0, 0);
                        width: 90%;
                        .uia1 {
                            display: flex;
                            align-items: center;
                            // border: 1px solid black;
                            .uia1_1 {
                                // border: 1px solid red;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                flex-wrap: wrap;
                                font-size: 13px;
                                .ti1 {
                                    color: #00c3ff;
                                }
                                .ti2 {
                                    margin-top: 6px;
                                    color: #999;
                                }
                            }
                        }
                    }
                }
                .w2_3 {
                    padding-bottom: 30px;
                    background-color: white;
                    // padding: 10px;
                    margin-top: 20px;
                    width: 95%;
                    margin-left: 6px;
                    display: flex;
                    justify-content: center;
                    flex-wrap: wrap;
                    .w2_3_index {
                        border-bottom: 1px solid #999;
                        width: 90%;
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        padding: 5px;
                        .una1 {
                            font-size: 16px;
                            font-weight: bolder;
                        }
                        .una2 {
                            font-size: 10px;
                            color: #999;
                            cursor: pointer;
                        }
                    }
                    .w2_3_index2 {
                        // border: 1px solid red;
                        border-bottom: 1px solid #999;
                        display: flex;
                        justify-content: space-between;
                        margin-top: 4px;
                        padding: 5px;
                        height: 130px;
                        cursor: pointer;
                        .ttt1 {
                            .img1 {
                                max-width: 80px;
                                position: absolute;
                                clip:rect(0px 90px 120px 0px);
                            }
                        }
                        .ttt2 {
                            // border: 1px solid black;
                            margin-left: 90px;
                            position: relative;
                            .ti1 {
                                font-size: 15px;
                                display: -webkit-box;
                                -webkit-box-orient: vertical;
                                -webkit-line-clamp: 2;
                                overflow: hidden;
                            }
                            .ti1:hover {
                                color: #00c3ff;
                            }
                            .ttt2_1 {
                                // border: 1px solid red;
                                margin-top: 5px;
                                display: flex;
                                align-items: center;
                                .img2 {
                                    max-width: 30px;
                                }
                                .ti2 {
                                    color: rgb(160, 159, 159);
                                    margin-left: 4px;
                                    font-size: 15px;
                                }
                            }
                            .ttt2_2 {
                                position: absolute;
                                font-size: 28px;
                                color: red;
                                font-weight: bolder;
                                bottom: 0;
                                right: 0;
                            }
                        }
                    }
                }
                .w2_5 {
                    padding-bottom: 30px;
                    background-color: white;
                    // padding: 10px;
                    margin-top: 20px;
                    width: 95%;
                    margin-left: 6px;
                    display: flex;
                    justify-content: center;
                    flex-wrap: wrap;
                    .w2_5_index {
                        border-bottom: 1px solid #999;
                        width: 90%;
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        padding: 5px;
                        .una1 {
                            font-size: 16px;
                            font-weight: bolder;
                        }
                        .una2 {
                            font-size: 10px;
                            color: #999;
                            cursor: pointer;
                        }
                    }
                    .w2_5_index2 {
                        // border: 1px solid red;
                        .tiing {
                            // border: 1px solid red;
                            cursor: pointer;
                            margin-top: 8px;
                            width: 230px;
                            display: flex;
                            // justify-content: center;
                            align-items: center;
                            img {
                                max-width: 50px;
                                border-radius: 4px;
                            }
                            span {
                                margin-left: 10px;
                            }
                            span:hover {
                                color: #00c3ff;
                            }
                        }
                    }
                }
            }
        }
        .index2 {
            // border: 1px solid red;
            opacity: 1;
            position: absolute;
            z-index: 2;
            position: fixed;
            top: 120;
            width: 100%;
            background-color: white;
            height: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            .iin {
                // border: 1px solid red;
                width: 50%;
                height: 100%;
                display: flex;
                justify-content: space-between;
                align-items: center;
                .index2_1 {
                    height: 100%;
                    // border: 1px solid black;
                    display: flex;
                    align-items: center;
                    span {
                        // border: 1px solid red;
                        display: flex;
                        align-items: center;
                        height: 100%;
                        margin-left: 10px;
                        font-size: 19px;
                        // color: #00c3ff;
                        // border-bottom: 2px solid #00c3ff;
                        cursor: pointer;
                    }
                }
                .index2_2 {
                    width: 120px;
                    background-color: #ffe14c;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-right: 30px;
                    padding: 10px;
                    font-weight: bolder;
                    border-radius: 5px;
                    cursor: pointer;
                    i {
                        font-size: 20px;
                    }
                }
            }
        }
    }
</style>